All the items on your desktop, including applications, documents and folders,
originate as blocks of data on your disk drive. These blocks are organised by the
directory, an invisible file which also contains extra information about each file.
File Components
qqqqqqqqqqqqq
Contrary to appearances, a typical file on a hard disk actually consists of three or more separate files. They include the resource and data forks (two separate files with the same name) and a header inside the invisible directory file. The latter also contains pointers that direct the processor to the disk locations for the resource and data forks.
The directory also points to icons for each file (originating from the relevant application’s resource fork) that are stored in the Desktop file (also invisible) and cross-referred using the file’s Type and Creator codes. And all of these files can be split into further parts when the drive becomes fragmented — it’s amazing it works at all!
The Resource Fork
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
This part of a file, unique to Macintosh files, contains things that do something, such as fonts, icons, pictures, menus, and programming code. All applications have a resource fork, usually without a data fork. Resource forks are highly standardised and can be easily modified with a utility such as ResEdit.
√π See the Using ResEdit chapter for how to use ResEdit
The Data Fork
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
This part of a file is similar to files used on non-Mac computers. It usually contains text, graphics or other data that you’ve created. Most documents have a data fork, usually without a resource fork (although some documents may only contain a resource fork). The data fork is usually only understood by the application that created it. Even so, utilities such as CanOpener can extract useful material from almost any file.
File Headers
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
This component, kept in the drive’s directory file, contains general information about a file, such as its filename, Type code, Creator code, dates and size, some of which appear in the Finder’s Get Info window.
The four-letter Type and Creator codes carried by each file identify its purpose. The Type defines the contents of a file whilst the Creator indicates which application was used to make the file. The filename can contain up to 31 characters.
When you modify or save a file, the Mac updates the file’s Modified date. If you only make a minor change, such as moving or copying the file, or modifying it’s filename or attributes, the date remains unchanged.
File Categories
qqqqqqqqqqq
 
Most files are applications or their associated documents. Desk accessories (DAs) are a kind of specialised application whose memory allocation is fixed at 20 K. Other files include:-
Special Files
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  The System Folder contains special files used by the system, Finder and other
applications. These include extensions and control panels — or preferences
created by the applications or control panels themselves.
Aliases
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
An alias is a file, occupying just a few K of disk space, that points towards another file.
Aliases should always be used in the Apple Menu Items, Launcher, Startup Items and Shutdown Items folders. An alias of a network file helps you avoid too many dialogs.
Clippings
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  A clipping is created when you drag and drop an item onto the Desktop. It can
contain text, graphics or a sound (but not a combination of these) and can be
viewed in the Finder — just select Copy to move the contents to the Clipboard.
Ô A clipping is opened without an application — so it doesn’t use much memory!
Invisible Files
qqqqqqqqqq
  There are several invisible files on your hard disk. You can make any of these
files visible, apart from the directory, by using a utility such as File Typer.
Examples of invisible files include:-
Folder Custom Icons
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
Although apparently integrated with the folder they adorn, these are actually invisible icon files that reside inside the folder itself.
√π See the Other Desktop Items chapter for details about icons
Desktop, Desktop DB and Desktop DF Files
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
These files, resident on each of your drives, are used to locate documents and their associated applications. On a diskette only the Desktop file is used.
Newly installed applications are added to the Desktop DB (database) file at shutdown, but not if you just turn off the machine! The database always remembers applications that you’ve removed. It’s reconstructed, taking account of all available applications, when you rebuild the Desktop — usually by holding down †-Option during startup.
È If you think that any desktop file is seriously corrupted you can make it visible, using a
utility such as FileTyper, put it in the Trash, and then rebuild the Desktop — or you can
use File Buddy to do this automatically.
È If you delete the Desktop DB file all Get Info comments will be lost.
Shutdown Check File
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
This file contains a record of whether the last shutdown was executed correctly. If not, you’ll get a warning message when you restart — but not if Shut Down Warning is disabled in the General Controls control panel!
Directory
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
This is a table of contents for your hard disk, recorded in a special area of the disk. It consists of a Catalogue Balanced Tree (or B-Tree) that has a symmetrical shape.
To locate a file the Mac follows a path from the root node (the directory itself) via the index nodes (sub directories) on a number of levels, to the leaf node (the physical location of the file). If a file is fragmented into more than three parts a separate Extents B-Tree is used to keep a record of their locations on the disk.
The directory also stores what you see in the Get Info window for a file.
È Disk tools, such Norton Utilities or MacTools, can check or repair the Directory.
File Types
qqqqqqq
  Each Mac file has a four-letter Type code that defines its contents — for example,
all text files, whatever the application created them, have a Type of TEXT. An
application uses these file Types to recognise those files it can open.
Some file Types can only be opened by a particular application. Others are generic files that are acceptable to several different applications. Examples of the latter include:-
Type Matching Applications
TEXT Word Processing
PICT Graphics
APPL Finder or Finder substitute
È APPL is the Type code given to a file containing any application.
È If you give a file a Type that doesn’t match its contents the relevant application will still
try to read it — the results can be unpredictable!
Common Types
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
Frequently encountered Types include:-
Finder
APPL Application
FNDR Finder
zsys System
cdev Control Panel
INIT Extension
FFIL Font
dfil Desk Accessory
sfil Sound
Generic
EPSF Encapsulated PostScript
PICT QuickDraw picture
GIFf Graphic Interchange File
TEXT Text
TIFF Tagged Image File Format
ttro Text — SimpleText read-only
Applications
drw2 Canvas Image
CWDB ClarisWorks database
CWGR ClarisWorks drawing
CWPT ClarisWorks painting
CWSS ClarisWorks spreadsheet
CWWP ClarisWorks word processing
PACT Compact Pro archive
DDF2 DiskDoubler archive
XLS3 Excel 3.x (Microsoft)
FMPR FileMaker Pro
FHD3 Freehand 3.x (Aldus)
STAK HyperCard stack
DRWG MacDraw II document
STAT MacDraw II stationery
PNTG MacPaint
WORD MacWrite
MW2D MacWrite II document
MW2S MacWrite II stationery
ALB3 Pagemaker 3.x (Aldus)
ALB4 Pagemaker 4.x (Aldus)
LWFN PostScript font
rsrc ResEdit
SFIL SoundMover sound suitcase
SIT! Stuffit archive
SITD Stuffit Deluxe archive
SPn3 SuperPaint 3.x image
WDBN Word (Microsoft)
AWWP Works word processing (Microsoft)
AWDB Works database (Microsoft)
AWSS Works spreadsheet (Microsoft)
File Creators
qqqqqqqqq
  A Creator code links a file to it’s parent application. If the file is an application
the Creator refers to itself. For example, all ClarisWorks files and the application
itself have a Creator code of BOBO.
The Finder uses the code to give a document the correct icon and to launch the relevant application when you double-click on it. If you give a document a new Creator code the Finder is persuaded that the file was created by the new application — and it appears with a new icon. The new application will be launched if you double-click on the document.
È If you change a Creator the file must be of a Type that the application recognises!
È The Finder doesn’t try to find the application of any file with a Creator of ????
— and it gives it a generic icon based on its Type.
Common Creators
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
The following list shows some examples of Creators:-
System
MACS System software
movr System 7 fonts, desk accessories and sound files
Applications
BOBO ClarisWorks
DSTL Acrobat Distiller
CARO Acrobat Reader
AOqe America Online
Arch Anarchie
R*ch BBEdit
DRD2 Canvas
MMan Claris Emailer
CPCT Compact Pro
EXTR Compact Pro self-extracting archive
CIM_ CompuServe Information Manager
prmt Desktop Print Manager (System application)
D2CT Disinfectant
dCpy Disk Copy
DDAP DiskDoubler
DSEA DiskDoubler self-extracting archive
DkmR DOCMaker
Dcmp DropCompress
SITC DropConvert
DStf DropStuff
XCEL Excel
CSOm Eudora
Δí‚à´√•√ü File Buddy
FMPR FileMaker Pro
FHA2 Freehand 2.x
FHA3 Freehand 3.x
GKON GraphicConverter
NvDa Guide Maker
WILD HyperCard
ARTZ Illustrator
ART3 Illustrator 3.x
ART5 Illustrator 5.x
JVWR JPEGView
MDRW MacDraw
MDPL MacDraw II
MPNT MacPaint
MACA MacWrite
MWII MacWrite II
MOR2 More
TVOD MoviePlayer
MPS_ MPW
MOSS Netscape Navigator
npdt Note Pad
NIC! Now Contact
PAD! Now QuickPad
ALD4 Pagemaker 4.x
ALD6 Pagemaker 6.x
ASPF PostScript font
8BIM Photoshop
XPR3 QuarkXPress 3.x
INTU Quicken
RCMP ResCompare
RSED ResEdit
sbkt Scrapbook
ToyS Script Editor (AppleScript)
Wrap ShrinkWrap
ttxt SimpleText
notz Stickies
SIT! StuffIt
SITx StuffIt Expander
SMOV SoundMover
SPNT SuperPaint
KAHL THINK C
TBP4 TouchBase Pro 4.x
JeFF UULite
TCPa Web Browser
MSWD Word
WPC2 Word Perfect
PSI2 Works 2.x
ZIP_ ZipIt
_ denotes a space
Pathnames
qqqqqqqq
A pathname explains the hierarchy of folders on the disk containing a file, such as:-
Hard Disk:Big Folder:Fred’s:Letter to Harry
This is the pathname for the file Letter to Harry which is contained within a folder called Fred’s which is itself inside a folder called Big Folder on a drive called Hard Disk.
È The pathname is delineated with colons — this means you can’t use colons in the
names for files, folders or drives. If you try the Mac enters a hyphen instead!
È Hold down Ç and click on a Finder’s window name to see the path of a folder.
È Some applications can’t open a file if its total path name exceeds 255 characters.
Attributes
qqqqqqq
Every file has attributes, single bits of data or flags, in the its header that define how the it behaves. Attributes can be enabled or disabled using ResEdit, File Buddy or GetMoreInfo. For example, by checking the Invisible attribute in such a utility, a file can be made invisible.
The following file attributes have the effect shown when checked:-
Invisible
The file can’t be seen.
Inited
The file is known to the Finder, which checks this attribute itself whenever it calls on the file. If you change other attributes, such as Invisible, it’s advisable to also uncheck Inited to to force the Finder to look at it. Utilities such as File Buddy do this automatically.
Use Custom Icon
A custom icon is in use — this is automatically checked when you paste graphics into the icon box in the Get Info window. Some text or graphics applications create their own custom icon, known as an icon preview, from the contents of a file when it’s saved.
Name Locked
You can’t change the file’s name. Certain files in the System Folder won’t let you to alter their names anyway.
Alias
The file is an alias. Most aliases are either created by the user or by a Recent feature in a Menu control panel such as MenuChoice or OtherMenu.
Stationery
The file is stationery. You can set this by using the check box provided in Get Info. Applications check this automatically whenever a file is saved as stationery.
Shared
The file is being shared over a network.
Has Bundle
The file is able create files of the same Creator. Most applications have this checked.
File Locked
The file can’t be altered, usually set by checking the Locked box in Get Info.
No INITS
The file does not contain any elements that modify the system at startup.
File Dates
qqqqqqq
The header in each Mac file keeps a record of the time and date it was created, last modified or last backed up, measured as a number in seconds since January 1st 1904.
This number in two parts:-
z Whole number part — left of the decimal point:
The number of whole days elapsed since January 1st 1904 indicating the date.
z Fractional part — right of the decimal point:
The remaining part of the given day — the actual time of day.
When a date number is recalled it’s converted into a localised format (such as the Roman calendar with years, months, days, hours and seconds) so that we can understand it. This numbering system should last until the year 2040 — let’s hope we see it!
The created and modified dates both appear in the Get Info window. The Mac doesn’t complain if a file’s creation date is later than the modification date but a test utility such as MacCheck will report it as a problem.